<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>我的消保金</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/page.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/media.js"></script>
    <script src="../js/common.js"></script>
    <style>

    </style>
</head>

<body>
    <!--头部-->
    <div class="public-header flex">
        <!--<span class="public-header-left-search"></span>-->
        <span class="public-header-left-back"></span>
        <span class="public-header-center">我的消保金</span>
        <span class="public-header-right">支出记录</span>
    </div>

    <!--正文-->
    <div class="My-blessing bc-gray">

        <ul>
            <li class="flex">
                <span>消保金金额</span>
                <em></em>
            </li>
            <li>
                <input type="text" id="money">
                <i class="button">缴纳</i>
            </li>
        </ul>
        <p class="t1">注:最新交易完成的3个月无法提现消保金</p>

    </div>




    <script>
        $(function () {
            $('.button').click(function () {
                let money = $('#money').val();
                if (money < 3000) {
                    alert('请输入3000以上，并且每次增加1000');
                } else {
                    if (money % 1000 != 0) {
                        alert('请输入3000以上，1000的倍数');
                    } else {
                        $.ajax({
                            url: base_url + 'ZITAOHUI/store/amountGuaranteed',
                            data: {
                                store_id: s_id,
                                money: money
                            },
                            success: function (data) {
                                console.log(data)
                            },
                            error: function () {

                            }
                        })
                    }
                }

            })
        })
    </script>
</body>

</html>